let favoritesWritable = global.settings.is_writable('favorite-apps');
apps.forEach(appId => {
- let app = appSys.lookup_app(appId);
+ let icon = this._items[appId];
+ if (!icon) {
+ let app = appSys.lookup_app(appId);
+
+ icon = new AppIcon(app, {
+ isDraggable: favoritesWritable,
+ });
+ }
- let icon = new AppIcon(app,
- { isDraggable: favoritesWritable });
newApps.push(icon);
});
for (let i = 0; i < mostUsed.length; i++) {
if (!mostUsed[i].get_app_info().should_show())
continue;
- let appIcon = new AppIcon(mostUsed[i],
- { isDraggable: favoritesWritable });
+ let appIcon = this._items[mostUsed[i].get_id()];
+ if (!appIcon) {
+ appIcon = new AppIcon(mostUsed[i], {
+ isDraggable: favoritesWritable,
+ });
+ }
apps.push(appIcon);
}